Platform Explorer / Nuxeo Platform 2023.22

Contribution org.nuxeo.template.service.defaultContrib--contextExtension

This contribution is part of XML component org.nuxeo.template.service.defaultContrib inside nuxeo-template-rendering-core-2023.22.13.jar /OSGI-INF/templateprocessor-contrib.xml

Documentation

Adds utility functions in the context

  • functions.getVocabularyTranslatedLabel(vocname, key, lang)
  • functions.getVocabularyLabel(vocname, key)
  • functions.getVocabularyLabel(vocname, key)
  • functions.formatDate(calendar)
  • functions.formatDateTime(calendar)
  • functions.formatTime(calendar)
  • functions.getNuxeoPrincipal(username)

Extension Point

Extension point contextExtension of component TemplateProcessorComponent.

Registration Order

0
The registration order represents the order in which this contribution was registered on its target extention point. This will impact the override/merge behaviour when it is implemented on the target service, and is useful for proper customization of existing contributions.
You can influence this order by adding "require" tags in the containing component declaration, to make sure it is resolved after another component (see "Resolution Order" on components).

Contributed Items

  • <contextFactory class="org.nuxeo.template.context.extensions.FunctionsExtensionFactory" name="functions">
         <aliasName>fn</aliasName>
         <aliasName>Fn</aliasName>
        </contextFactory>

XML Source

<extension point="contextExtension" target="org.nuxeo.template.service.TemplateProcessorComponent">

    <documentation>
      Adds utility functions in the context
      <ul>
        <li>functions.getVocabularyTranslatedLabel(vocname, key, lang)</li>
        <li>functions.getVocabularyLabel(vocname, key)</li>
        <li>functions.getVocabularyLabel(vocname, key)</li>
        <li>functions.formatDate(calendar)</li>
        <li>functions.formatDateTime(calendar)</li>
        <li>functions.formatTime(calendar)</li>
        <li>functions.getNuxeoPrincipal(username)</li>
      </ul>
    </documentation>

    <contextFactory class="org.nuxeo.template.context.extensions.FunctionsExtensionFactory" name="functions">
     <aliasName>fn</aliasName>
     <aliasName>Fn</aliasName>
    </contextFactory>

  </extension>